package com.ld.security.server.user.modules.ups.api;


import com.ld.security.common.mybatis.base.po.EntityPo;
import com.ld.security.common.mybatis.base.vo.DataVo;
import com.ld.security.common.tomcat.base.api.*;

import com.ld.security.common.tomcat.base.api.SuperApi;
import com.ld.security.server.user.modules.ups.util.UpsUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.ld.security.server.user.modules.ups.entity.UpsViewEntity;

import javax.validation.Valid;


@RestController
@Api(tags="用户视图Api管理")
@RequestMapping("/api/upsView")
public class UpsViewApi  extends SuperApi<UpsViewEntity>{

        @ApiOperation("添加一个日志")
        @RequestMapping(value = "/saveLog",method = RequestMethod.POST)
        public DataVo saveLog(@RequestBody @Valid EntityPo<UpsViewEntity> po){
                po.getEntity().setUpsUserId(UpsUtil.getUpsUserId());
                this.save(po);
                return DataVo.of();
        }

        }
